package com.kingint.web.portal.base.controller;


import com.kingint.common.unitedresult.K;
import com.kingint.mbg.bas.entity.BasItemsLeft;
import com.kingint.web.portal.base.service.ItemsLeftService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/itemsLeft")
@Api(value = "ItemsLeftController", description = "前端遗留物品控制层")
@CrossOrigin
public class ItemsLeftController {

    @Resource
    private ItemsLeftService itemsLeftService;

    @ApiOperation(value = "获取遗留物品列表信息")
    @GetMapping("/getItemsLeftList")
    public Object getItemsLeftList(){
        List<BasItemsLeft> allItemsLeftList = itemsLeftService.getAllItemsLeftList();
        return K.ok().data(allItemsLeftList);
    }
}
